<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="ja" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta http-equiv="Content-Style-Type" content="text/css">
<!-- meta -->
<meta name="keywords" content="">
<meta name="description" content="">
<!-- /meta -->
<c:if test="${displaySort == '0'}" >
	<title>資料メタデータ表示設定登録</title>
</c:if>
<c:if test="${displaySort == '1'}" >
	<title>ファイルメタデータ表示設定登録</title>
</c:if>
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/base.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/headerfooter.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/ulol.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/arrow.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/elements.css">
<!-- admin -->
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/base_admin.css">
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/elements_admin.css">
<!-- /admin -->
<script type="text/javascript" src="<%= request.getContextPath() %>/common/js/library.js"></script>
<script type="text/javascript" src="<%= request.getContextPath() %>/common/js/swfobject.js"></script>
<link rel="stylesheet" type="text/css" href="<%= request.getContextPath() %>/common/css/for_winie3.css">
<SCRIPT type="text/javascript" src="<%= request.getContextPath() %>/common/js/metaDataCommon.js"></SCRIPT>
<script type="text/javascript">

	function getSchemaid() {

		return {displaySort :"${displaySort}" , contextroot : "<%= request.getContextPath() %>", keySchemaid: "${keySchemaid}", displayId: "${displayId}", actionType: "${actionType}"};
	}

	function getContextroot() {

		return "<%= request.getContextPath() %>";
	}

	/**
	* Flexから呼び出される関数
	* 表示テーブルで設定した内容をポップアップ画面に表示する
	**/
	function setFrntTable(tableStr){
		previewSpan.innerHTML=tableStr;
		window.open('<%= request.getContextPath() %>/outputfront/popupFrntPreview','child1', 'width=650, height=600, menubar=no, toolbar=no, scrollbars=yes');
	}

	//FLEXのfromJssGetFrontData関数を呼び出す
	//確認ボタンが押下された場合、確認画面に遷移
	function setFrntData(){

		if (document.getElementById('displayNameId').value.length == 0) {
			alert("タイトルを入力してください。");
			return;
		}

		var flashMovie = swfobject.getObjectById("swfContent");
		var frntData = flashMovie.fromJssGetFrontData();

		if (frntData.length == 0) {
			alert("データを入力してください。");
			return;
		}

		document.getElementById('frntXML').value = frntData;

		confirmForm.submit();
	}

	//キャンセルボタン押下時、登録・編集画面に遷移
	function back(){

		location.href="<%= request.getContextPath() %>/outputfront/frontDisplayList?displaySort=" + "${displaySort}" + "&keySchemaid=" + "${keySchemaid}";
	}
</script>
</head>
<body id="dch" onunload="doUnload()">
<!-- === headerArea === -->
<div id="headerArea">
<a name="pageTop" id="pageTop"></a>
<jsp:include page="/common/include/header.jsp" />
</div><!-- === /headerArea === -->
<!-- === mainArea === -->
<div id="mainArea">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
	<tr valign="top">
		<td width="140" id="leftArea">
		<!-- === leftArea === -->
			<!-- メニューリスト-->
			<jsp:include page="output_menu.jsp" />
		<!-- === /leftArea === -->
		</td>
		<td width="20"><img src="<%= request.getContextPath() %>/common/images/spacer.gif" width="20" height="4" border="0" alt=""></td>
		<td id="contentsArea">
		<!-- === contentsArea === -->
			<!-- headingLv01Block -->
			<div class="headingLv01Block">
			<c:if test="${displaySort == '0'}" >
				<h1>資料メタデータ表示設定登録</h1>
			</c:if>
			<c:if test="${displaySort == '1'}" >
				<h1>ファイルメタデータ表示設定登録</h1>
			</c:if>
				<!-- headingLv01 -->

				<!-- /headingLv01 -->
			</div>
			<!-- /headingLv01Block -->
			<!-- columnB01 -->
			<div class="columnB01">
			</div>
			<!-- /columnB01 -->
			<!-- headingLv02 -->
			<div class="headingLv02">
			<table border="0" cellspacing="0" cellpadding="5" width="558">
				<tr>
					<td><p>
						<c:if test="${displaySort == '0'}" >
							<em>資料メタデータ情報 - ヘッダー</em>
						</c:if>
						<c:if test="${displaySort == '1'}" >
							<em>ファイルメタデータ情報 - ヘッダー</em>
						</c:if>

						</p>
					</td>
				</tr>
			</table>
			</div>
			<!-- /headingLv02 -->
			<form action="<%= request.getContextPath() %>/outputfront/frontDisplayStore" method="post" name="confirmForm">
			<s:hidden name="displaySort"/>
			<s:hidden name="displayId"/>
			<s:hidden name="actionType"/>
			<s:token/>
			<div style="display:none">
				<textarea name="frntXML" id = "frntXML"></textarea>
			</div>
			<div class="tableA01">
			<table border="1" cellspacing="0" cellpadding="5" >
				<tr>
					<th class="lv01B" colspan="3"><font color="red" >*</font>タイトル</th>
					<th class="lv01B"><s:textfield name = "displayName" id = "displayNameId" size="43"/></th>
				</tr>
			</table>
			</div>
			<s:hidden name="keySchemaid"/>
			<!-- headingLv02 -->
			<div class="headingLv02">
				<div id="swfContent">
				<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
				</div>
				<script type="text/javascript">
					var attributes = {id:'swfContent',name:'swfContent'};
					swfobject.embedSWF("<%= request.getContextPath() %>/common/swf/outputSchemaManager.swf", "swfContent", "1000", "580", "9.0.0", "<%= request.getContextPath() %>/common/swf/expressInstall.swf",null,null,attributes);
				</script>
			</div>

			<div style="display:none">
				<span id="previewSpan"></span>

				<!-- <textarea name="previewSrc" cols="120" rows="20"></textarea> -->
			</div>
			<!-- pageNaviC01 -->
			<div class="pageNaviC01">
			<table border="0" cellspacing="0" cellpadding="10" width="558">
				<tr>
					<td width="298" class="left"><p><input type="button" value="戻る" style="width:100px" onclick="back()"></p></td>
					<td width="130" class="left">&nbsp;</td>
					<td width="130" class="right"><p><input type="button" value="登録する" style="width:130px" onclick="setFrntData()"></p></td>
				</tr>
			</table>
			</div>
			</form>
		<!-- === /contentsArea === -->
		</td>
		<td width="16"><img src="<%= request.getContextPath() %>/common/images/spacer.gif" width="16" height="4" border="0" alt=""></td>
	</tr>

</table>
</div><!-- === /mainArea === -->
<!-- === footerArea === -->
<div id="footerArea">
<jsp:include page="/common/include/footer.jsp" />
<!--#include virtual="<%= request.getContextPath() %>/common/include/footer.html" -->
</div><!-- === /footerArea === -->
</body>
</html>
<!-- System Architect is COOBA Corp
	Copyright 2010 COOBA Corp All rights reserved -->